package web.suzy.oj.pojo.entity.user;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * YangSuzy 软件工作室
 * 类名: Session
 * 描述: 用户登录会话实体类
 * 功能: ---- 待定 -----
 *
 * @author YangSuzy
 * Date: 2022/11/14 14:52
 */
@Data
@EqualsAndHashCode(callSuper = false)//排除父类字段
@Accessors(chain = true)//开启链式编程
@ApiModel(value = "session会话对象")
public class Session {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户uid")
    private String uid;

    @ApiModelProperty(value = "访问的浏览器参数")
    private String userAgent;

    @ApiModelProperty(value = "用户访问的IP")
    private String ip;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "修改时间")
    private Date modifiedTime;
}
